package edu.mis.modules.orderformitem;

import com.jfinal.core.Controller;

import edu.mis.modules.user.UserService;

public class OrderformitemController extends Controller{
	
	static UserService userService = new UserService();
    static OrderformitemService orderformitemService = new OrderformitemService();
	
    public void index() {
		
		
		if(userService.findUserWithRole().equals(1) || userService.findUserWithRole().equals(2)) {
			render("orderformitem.html");
		}else {
			render("noAllAuthority.html");	 
		}
		
	}
    
    public void list(){
		setAttr("data", orderformitemService.findAllRecordWithName());
		renderJson();  
	}
    
}
